'use strict';
/**
 * logic
 * @param  {} []
 * @return {}     []
 */
import Base from './base.js';
export default class extends Base {
  /**
   * index action logic
   * @return {} []
   */
  * indexAction(){
    

    let rules = { 
      subscribe  : "required|string",
      // data       :{
      //     // required: false, 
      //     default : {}
      // }
    }

    let flag = this.validate(rules);
    
    if(!flag){
      return this.http.errMsg(this.errors());
    }

    if(this.http.data.data && 'token' in this.http.data.data){
        yield this.http.socket.user.check(this.http.data.data);
    }
  }
}
